package com.arceus.leetcode;

/**
 * @author : iron
 * @version : 1.0.0
 * @date : 5:13 PM 2019/1/8
 */

public class T717 {

    public static void main(String[] args) {

        int[] bit =new int[]{1,1,0,1};
        System.out.println(isOneBitCharacter(bit));
    }

    public static boolean isOneBitCharacter(int[] bits) {

        boolean flag = false;

        for (int i = 0; i < bits.length; i++) {
            if (bits[i] == 1) {
                    i++;
                flag = false;
                continue;
            }
            if (bits[i] == 0) {
                flag = true;
            }
        }
        return flag;
    }

}
